<?php

namespace Biz\Mailers;

use Biz\Contracts\Mailer\TagsContract;

/**
 * MailerTags.
 *
 * @license [http://www.85do.com] [杭州永奥网络科技有限公司]
 * @copyright Copyright (c) 2018-2026 Hangzhou Yongao Technology Co., Ltd. All rights reserved.
 */
abstract class MailerTags implements TagsContract
{
    /**
     * 支持的标签,key的名称即是支持的标签名称，如{{site_name}}.
     *
     * @var array
     */
    protected $tags = [];

    /**
     * 设置一个新的标签（无限使用）.
     *
     * @param string $key
     * @param string $value
     *
     * @return TagsContract
     */
    public function setTag(string $key, string $value): TagsContract
    {
        $this->tags[$key] = $value;

        return $this;
    }

    /**
     * Set Tags.
     *
     * @param array $tags
     *
     * @return TagsContract
     */
    public function setTags(array $tags): TagsContract
    {
        $this->tags = $tags;

        return $this;
    }

    /**
     * Get Tags.
     */
    public function getTags(): array
    {
        return $this->tags;
    }
}
